﻿using System;
using System.Collections.Generic;
using System.Windows.Forms;

namespace NNFramework.NeuroLibrary.UserControls
{
    public partial class NeuronViewer <TInput, TOutput> : UserControl
        where TInput : struct
        where TOutput : struct
    {
        #region Members Section

        private clsNeuron<TInput, TOutput> _mNeuron;

        #endregion

        public NeuronViewer()
        {
            InitializeComponent();
        }

        //[Browsable(true)]
        public clsNeuron<TInput, TOutput> NeuronDataSource
        {
            get { return _mNeuron; }
            set 
            { 
                _mNeuron = value;
                if (_mNeuron != null)
                {
                    lblDendrites.Text = String.Format("Dendrites: {0}", _mNeuron.DendritesCount);
                    lblActivationFunction.Text = String.Format("Activation Function: {0}", _mNeuron.ActivationFunction);
                    dgvDendritesValue.DataSource = _mNeuron.Dendrites;
                }
                
            }
        }
    }
}
